package com.tomato.dto;

import com.tomato.entity.TodoSetting;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;

@Data
@Schema(description = "待办设定DTO")
public class TodoSettingDTO {
    @Schema(description = "待办标题/名称", required = true)
    private String title;

    @Schema(description = "POMODORO=普通番茄钟；GOAL=定目标", required = true)
    private TodoSetting.Type type;

    @Schema(description = "COUNTDOWN=倒计时；UPTIME=正向计时；NO_TIMER=不计时", required = true)
    private TodoSetting.TimerMode timerMode;

    @Schema(description = "倒计时总时长，单位：秒；仅 timer_mode=COUNTDOWN 时有效")
    private Integer countdownDuration;

    @Schema(description = "目标截止日期（到天）；仅 type=GOAL 时有效")
    private LocalDate goalDeadline;

    @Schema(description = "目标维度：DURATION=完成时长；TIMES=完成次数；仅 type=GOAL 时有效")
    private TodoSetting.GoalTargetType goalTargetType;

    @Schema(description = "目标值：若 goal_target_type=DURATION 则单位秒，=TIMES 则单位次数；仅 type=GOAL 时有效")
    private Integer goalTargetValue;

    @Schema(description = "每次计时结束后的休息时长，单位：秒，默认 5 分钟")
    private Integer restDuration = 300;

    @Schema(description = "本次待办需要循环的轮数，默认 1 轮")
    private Integer cycle = 1;
}